import request from "../../utils/request.js"
const state = {
	listData:{},
}
const mutations = {
	SET_LISTDATA(state,listData){
		state.listData = listData
	}
}
const actions = {
	async getListData({commit}){
		const result = await request('/getIndexData')
		// console.log(result);
		commit('SET_LISTDATA',result)
	}
}
const getters = {
	indexList(state){
		return state.listData.list || []
	}
	
}

export default {
	state,
	mutations,
	actions,
	getters
}
